{extend name="base" /} {block name="body"}
{block name="css"}
	<link rel="stylesheet" href="/public/oem/css/iconfont.css" />
	<link rel="stylesheet" href="/public/oem/css/css.css" />
{/block}
<div class="layui-body">
	<div class="navbar">
		<a><cite>财务管理</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>佣金日志 </cite></a>
	</div>		
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">佣金日志</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form layui-form-pane" action="{:url('finance/yj_logs')}" method="get">
				<div class="layui-inline">
					<label class="layui-form-label">搜索关键字</label>
					<div class="layui-input-inline">
						<input type="text" name="keyword" value="" placeholder="会员编号/姓名/手机号" class="layui-input">
					</div>
				</div>
				
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 150px">时间</label>
		            <div class="layui-inline">
					    <div class="layui-input-inline">
				        <input type="text" class="layui-input" {if $begin_time} value="{$begin_time}" {/if} name="begin_time" id="begin_time" placeholder="yyyy年MM月dd日">
					    </div>
					</div>
		                <i class="chax_line"></i>
		            <div class="layui-inline">
					    <div class="layui-input-inline">
					    <input type="text" class="layui-input" {if $end_time} value="{$end_time}" {/if}  name="end_time"  id="end_time" placeholder="yyyy年MM月dd日">
					    </div>
					</div>
				</div>
				<div class="layui-inline">
					<button class="layui-btn">搜索</button>
				</div>
			</form>
			<hr>
			<table class="layui-table layui-form">
				<thead>
					<tr>
						<th>ID</th>
						<th>订单编号</th>
						<th>订单人</th>
						<th>奖励会员</th>
						<th>奖励会员姓名</th>
						<th>奖励金额</th>
						<th>商品类型</th>
						<th>详情</th>					
						<th>所属合伙人</th>
						<th>所属城市运营中心</th>
						<th>添加时间</th>
					</tr>
				</thead>
				<tbody>
					<form id="listForm">
					{foreach name="list" item="vo"}
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.order_sn}</td>
						<td>{$vo.mid}</td>
						<td>{$vo.user_id}</td>
						<td>{$vo.real_name?$vo.real_name:$vo.mobile}</td>
						<td>{$vo.balance}</td>						
						<td>
							{if $vo.type==2}
							推荐注册
							{elseif $vo.type==3}	
							预定
							{elseif $vo.type==5}	
							注册会员城市运营中心佣金
							{elseif $vo.type==6}	
							会员直推注册佣金
							{elseif $vo.type==7}	
							会员间推注册佣金 
							{elseif $vo.type==8}	
							注册会员合伙人佣金
							{elseif $vo.type==9}	
							推荐合伙人佣金  
							{elseif $vo.type==10}	
							预定直接推荐分佣
							{elseif $vo.type==11}	
							预定间接分佣
							{elseif $vo.type==12}	
							预定合伙人分佣
							{elseif $vo.type==13}	
							预定城市运营中心分佣
							{elseif $vo.type==14}	
							商品直接推荐分佣
							{elseif $vo.type==15}	
							商品间接推荐分佣
							{elseif $vo.type==16}	
							商品合伙人分佣
							{elseif $vo.type==17}	
							商品城市运营中心分佣
							{else/}	
							商品
							{/if}
						</td>
						<td>{$vo.message}</td>
						<td>{$vo.ptname?$vo.ptname:$vo.ptname2}</td>
						<td>{$vo.cityname?$vo.cityname:$vo.cityname2}</td>
						<td>{$vo.add_time}</td>
					</tr>
					{/foreach}
					</form>
				</tbody>
			</table>
			<!--分页-->
			{$list->render()}
		</div>
	</div>
</div>
{/block}
{block name="js"}
<script src="/public/static/layui/layui.js"></script>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "{$controller}/yj_logs"
	};
	layui.use('laydate', function(){
		var laydate = layui.laydate;
		
		//日期控件
		laydate.render({
		    elem: '#begin_time'
		    ,type: 'datetime'
		    ,format: 'yyyy-MM-dd HH:mm:ss'
		});
		  
		laydate.render({
		    elem: '#end_time'
		    ,type: 'datetime'
		    ,format: 'yyyy-MM-dd HH:mm:ss'
		});
		
	})
</script>
{/block}